from sqlalchemy.orm import Session

from module_sys.dao.UserDao import UserDao
from module_sys.entity.user2 import User2


class UserService:
    """
    用户管理模块服务层
    """

    @classmethod
    def get_user_list_services(cls, db: Session):
        user_list_result = UserDao.getAllUser(db)
        return user_list_result

    @classmethod
    def getUserInfo(cls):
        u = User2()
        u.mobile = '18363544102'
        u.nikename = 'test'
        u.password = '222'
        u.save()
        return u
